package com.example.layout_20;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;

public class InflaterActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_inflater);
		ViewGroup viewGroup = (ViewGroup) findViewById(R.id.layout1);
		LayoutInflater inflater = getLayoutInflater();
		View viewUsername = inflater.inflate(R.layout.include_username, null);
		View viewPassword = inflater.inflate(R.layout.include_password, null);
		View viewSumbit = inflater.inflate(R.layout.include_submit, null);
		viewGroup.addView(viewUsername);
		viewGroup.addView(viewPassword);
		viewGroup.addView(viewSumbit);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.inflater, menu);
		return true;
	}

}
